# 模块
# Python在导入模块时，实际上是将模块的代码全部执行一遍
import pack1

from pack1 import module1
from pack1 import module1 as m1
from pack1.module1 import i
from pack1.module2 import i as ii

print(i)
print(ii)

print(module1.i)
module1.printI()

print(m1.i)
m1.printI()

import sys

# 查看导入了哪些模块
for k, v in sys.modules.items():
    print(k, v)

# 查看模块的寻找路径
print(sys.path)
